#pragma once

#include "Defines.hpp"
#include "cybertron/node/BaseApp.hpp"

class AgentServer : public SocketTcpServer
{
public:
	static AgentServer * GetInstance()
	{
		static AgentServer instance;
		return &instance;
	}
	AgentServer();
	virtual ~AgentServer();
	void SetListenPort(int ListenPort);

	/*void TaskStartEvent(std::string task_id);
	void TaskEndEvent(std::string task_id);*/
	void run();
	
	std::string getId();
private:
	void zeroMembers();
	void clearThis();

protected:
	virtual void onAccept(SocketBasePtr pRemoteSocket);

	int mListenPort;
	std::string mGroupId;
	std::string mType;
	std::string mId;
	
	//SimOneEnv::SimOneSONServerInfo mSonServerInfo;
};
